<!DOCTYPE html>
<html lang="en">
<head>
<title>cef4delphi: uCEFExtensionHandler: Class TCefExtensionHandlerRef</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="TCefExtensionHandlerRef"></span><h1 class="cio">Class TCefExtensionHandlerRef</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uCEFExtensionHandler.html">uCEFExtensionHandler</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCefExtensionHandlerRef = class(<a class="normal" href="uCEFBaseRefCounted.TCefBaseRefCountedRef.html">TCefBaseRefCountedRef</a>, <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html">ICefExtensionHandler</a>)</code></p>
<h2 class="description">Description</h2>
<p class="nodescription">This item has no description.</p><span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TInterfacedObject</li>
<li class="ancestor"><a class="normal" href="uCEFBaseRefCounted.TCefBaseRefCountedRef.html">TCefBaseRefCountedRef</a></li>
<li class="thisitem">TCefExtensionHandlerRef</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#OnExtensionLoadFailed-TCefErrorcode-">OnExtensionLoadFailed</a></strong>(result: <a href="uCEFTypes.html#TCefErrorCode">TCefErrorcode</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#OnExtensionLoaded-ICefExtension-">OnExtensionLoaded</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#OnExtensionUnloaded-ICefExtension-">OnExtensionUnloaded</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#OnBeforeBackgroundBrowser-ICefExtension-ustring-ICefClient-TCefBrowserSettings-">OnBeforeBackgroundBrowser</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const url: <a href="uCEFTypes.html#ustring">ustring</a>; var client: <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>; var settings: <a href="uCEFTypes.TCefBrowserSettings.html">TCefBrowserSettings</a>) : boolean;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#OnBeforeBrowser-ICefExtension-ICefBrowser-ICefBrowser-Integer-ustring-boolean-TCefWindowInfo-ICefClient-TCefBrowserSettings-">OnBeforeBrowser</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser, active_browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; index: Integer; const url: <a href="uCEFTypes.html#ustring">ustring</a>; active: boolean; var windowInfo: <a href="uCEFTypes.TCefWindowInfo.html">TCefWindowInfo</a>; var client: <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>; var settings: <a href="uCEFTypes.TCefBrowserSettings.html">TCefBrowserSettings</a>) : boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#GetActiveBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-">GetActiveBrowser</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; include_incognito: boolean; var aRsltBrowser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#CanAccessBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-">CanAccessBrowser</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; include_incognito: boolean; const target_browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>): boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#GetExtensionResource-ICefExtension-ICefBrowser-ustring-ICefGetExtensionResourceCallback-">GetExtensionResource</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; const file_: <a href="uCEFTypes.html#ustring">ustring</a>; const callback: <a href="uCEFInterfaces.ICefGetExtensionResourceCallback.html">ICefGetExtensionResourceCallback</a>): boolean;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#RemoveReferences">RemoveReferences</a></strong>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="uCEFExtensionHandler.TCefExtensionHandlerRef.html#UnWrap-Pointer-">UnWrap</a></strong>(data: Pointer): <a href="uCEFInterfaces.ICefExtensionHandler.html">ICefExtensionHandler</a>;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnExtensionLoadFailed-TCefErrorcode-"></span><code>procedure <strong>OnExtensionLoadFailed</strong>(result: <a href="uCEFTypes.html#TCefErrorCode">TCefErrorcode</a>);</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#OnExtensionLoadFailed-TCefErrorcode-">ICefExtensionHandler.OnExtensionLoadFailed</a>.</p><p>
 Called if the ICefRequestContext.LoadExtension request fails. |result| will be the error code. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnExtensionLoaded-ICefExtension-"></span><code>procedure <strong>OnExtensionLoaded</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>);</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#OnExtensionLoaded-ICefExtension-">ICefExtensionHandler.OnExtensionLoaded</a>.</p><p>
 Called if the ICefRequestContext.LoadExtension request succeeds. |extension| is the loaded extension. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnExtensionUnloaded-ICefExtension-"></span><code>procedure <strong>OnExtensionUnloaded</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>);</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#OnExtensionUnloaded-ICefExtension-">ICefExtensionHandler.OnExtensionUnloaded</a>.</p><p>
 Called after the ICefExtension.Unload request has completed. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnBeforeBackgroundBrowser-ICefExtension-ustring-ICefClient-TCefBrowserSettings-"></span><code>function <strong>OnBeforeBackgroundBrowser</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const url: <a href="uCEFTypes.html#ustring">ustring</a>; var client: <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>; var settings: <a href="uCEFTypes.TCefBrowserSettings.html">TCefBrowserSettings</a>) : boolean;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#OnBeforeBackgroundBrowser-ICefExtension-ustring-ICefClient-TCefBrowserSettings-">ICefExtensionHandler.OnBeforeBackgroundBrowser</a>.</p><p>
 Called when an extension needs a browser to host a background script specified via the &quot;background&quot; manifest key. The browser will have no visible window and cannot be displayed. |extension| is the extension that is loading the background script. |url| is an internally generated reference to an HTML page that will be used to load the background script via a &quot;&lt;script&gt;&quot; src attribute. To allow creation of the browser optionally modify |client| and |settings| and return false (0). To cancel creation of the browser (and consequently cancel load of the background script) return true (1). Successful creation will be indicated by a call to ICefLifeSpanHandler.OnAfterCreated, and ICefBrowserHost.IsBackgroundHost will return true (1) for the resulting browser. See <a href="https://developer.chrome.com/extensions/event_pages">https://developer.chrome.com/extensions/event_pages</a> for more information about extension background script usage. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnBeforeBrowser-ICefExtension-ICefBrowser-ICefBrowser-Integer-ustring-boolean-TCefWindowInfo-ICefClient-TCefBrowserSettings-"></span><code>function <strong>OnBeforeBrowser</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser, active_browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; index: Integer; const url: <a href="uCEFTypes.html#ustring">ustring</a>; active: boolean; var windowInfo: <a href="uCEFTypes.TCefWindowInfo.html">TCefWindowInfo</a>; var client: <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>; var settings: <a href="uCEFTypes.TCefBrowserSettings.html">TCefBrowserSettings</a>) : boolean;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#OnBeforeBrowser-ICefExtension-ICefBrowser-ICefBrowser-Integer-ustring-boolean-TCefWindowInfo-ICefClient-TCefBrowserSettings-">ICefExtensionHandler.OnBeforeBrowser</a>.</p><p>
 Called when an extension API (e.g. chrome.tabs.create) requests creation of a new browser. |extension| and |browser| are the source of the API call. |active_browser| may optionally be specified via the windowId property or returned via the get_active_browser() callback and provides the default |client| and |settings| values for the new browser. |index| is the position value optionally specified via the index property. |url| is the URL that will be loaded in the browser. |active| is true (1) if the new browser should be active when opened. To allow creation of the browser optionally modify |windowInfo|, |client| and |settings| and return false (0). To cancel creation of the browser return true (1). Successful creation will be indicated by a call to ICefLifeSpanHandler.OnAfterCreated. Any modifications to |windowInfo| will be ignored if |active_browser| is wrapped in a ICefBrowserView. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetActiveBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-"></span><code>procedure <strong>GetActiveBrowser</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; include_incognito: boolean; var aRsltBrowser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>);</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#GetActiveBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-">ICefExtensionHandler.GetActiveBrowser</a>.</p><p>
 Called when no tabId is specified to an extension API call that accepts a tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the source of the API call. Return the browser that will be acted on by the API call or return NULL to act on |browser|. The returned browser must share the same ICefRequestContext as |browser|. Incognito browsers should not be considered unless the source extension has incognito access enabled, in which case |include_incognito| will be true (1). </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="CanAccessBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-"></span><code>function <strong>CanAccessBrowser</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; include_incognito: boolean; const target_browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>): boolean;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#CanAccessBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-">ICefExtensionHandler.CanAccessBrowser</a>.</p><p>
 Called when the tabId associated with |target_browser| is specified to an extension API call that accepts a tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the source of the API call. Return true (1) to allow access of false (0) to deny access. Access to incognito browsers should not be allowed unless the source extension has incognito access enabled, in which case |include_incognito| will be true (1). </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetExtensionResource-ICefExtension-ICefBrowser-ustring-ICefGetExtensionResourceCallback-"></span><code>function <strong>GetExtensionResource</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; const file_: <a href="uCEFTypes.html#ustring">ustring</a>; const callback: <a href="uCEFInterfaces.ICefGetExtensionResourceCallback.html">ICefGetExtensionResourceCallback</a>): boolean;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#GetExtensionResource-ICefExtension-ICefBrowser-ustring-ICefGetExtensionResourceCallback-">ICefExtensionHandler.GetExtensionResource</a>.</p><p>
 Called to retrieve an extension resource that would normally be loaded from disk (e.g. if a file parameter is specified to chrome.tabs.executeScript). |extension| and |browser| are the source of the resource request. |file| is the requested relative file path. To handle the resource request return true (1) and execute |callback| either synchronously or asynchronously. For the default behavior which reads the resource from the extension directory on disk return false (0). Localization substitutions will not be applied to resources handled via this function. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="RemoveReferences"></span><code>procedure <strong>RemoveReferences</strong>;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefExtensionHandler.html#RemoveReferences">ICefExtensionHandler.RemoveReferences</a>.</p><p>
 Custom procedure to clear all references. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="UnWrap-Pointer-"></span><code>class function <strong>UnWrap</strong>(data: Pointer): <a href="uCEFInterfaces.ICefExtensionHandler.html">ICefExtensionHandler</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
